import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum=1;
        int left=1,right=1;
        while(left<=n/2) {
            if(sum<n){
                right++;
                sum+=right;
            }
            else if(sum>n){
                sum-=left;
                left++;
            }
            else {
                System.out.println(left+" "+right);
                right++;
                sum+=right;
            }
        }
    }
}
